package com.ourteam.product.ui.dao;
/**
 * Template Name : DAO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Aug 18 15:51:23 CST
 * 2017 Auto Generate Date : 2018-12-14 15:15:07 Warning ! This file will be overwrite when
 * regenerate !
 */
import org.apache.commons.lang.StringUtils;

public class ProductUIFormLayoutData implements java.io.Serializable {

  public ProductUIFormLayoutData() {
    super();
  }

  private long id;

  /** Attribute id Be Seted Falg */
  private boolean idSetted = false;

  /** Attribute id is Null Falg */
  private boolean idNull = false;

  /**
   * Get id
   *
   * @return long
   */
  public final long getId() {

    return id;
  }

  /**
   * Set id
   *
   * @param long
   */
  public final void setId(long id) {

    this.id = id;

    this.idSetted = true;

    this.setIdNull(false);
  }

  /**
   * Get id Has Been Setted
   *
   * @return boolean
   */
  public final boolean isIdSetted() {
    return this.idSetted;
  }

  /** Set id Null */
  public final void setIdNull() {

    this.idNull = true;
  }

  public final void setIdNull(boolean aNullFlag) {

    this.idNull = aNullFlag;
  }

  public final boolean isIdNull() {

    return this.idNull;
  }

  private long formFieldId;

  /** Attribute formFieldId Be Seted Falg */
  private boolean formFieldIdSetted = false;

  /** Attribute formFieldId is Null Falg */
  private boolean formFieldIdNull = false;

  /**
   * Get formFieldId
   *
   * @return long
   */
  public final long getFormFieldId() {

    return formFieldId;
  }

  /**
   * Set formFieldId
   *
   * @param long
   */
  public final void setFormFieldId(long formFieldId) {

    this.formFieldId = formFieldId;

    this.formFieldIdSetted = true;

    this.setFormFieldIdNull(false);
  }

  /**
   * Get formFieldId Has Been Setted
   *
   * @return boolean
   */
  public final boolean isFormFieldIdSetted() {
    return this.formFieldIdSetted;
  }

  /** Set formFieldId Null */
  public final void setFormFieldIdNull() {

    this.formFieldIdNull = true;
  }

  public final void setFormFieldIdNull(boolean aNullFlag) {

    this.formFieldIdNull = aNullFlag;
  }

  public final boolean isFormFieldIdNull() {

    return this.formFieldIdNull;
  }

  private String name;

  /** Attribute name Be Seted Falg */
  private boolean nameSetted = false;

  /** Attribute name is Null Falg */
  private boolean nameNull = false;

  /**
   * Get name
   *
   * @return String
   */
  public final String getName() {

    if (isNameNull()) {
      return null;
    } else {
      return StringUtils.trim(name);
    }
  }

  /**
   * Set name
   *
   * @param String
   */
  public final void setName(String name) {

    this.name = StringUtils.trim(name);

    this.nameSetted = true;

    this.setNameNull(this.name == null);
  }

  /**
   * Get name Has Been Setted
   *
   * @return boolean
   */
  public final boolean isNameSetted() {
    return this.nameSetted;
  }

  /** Set name Null */
  public final void setNameNull() {

    this.nameNull = true;
  }

  public final void setNameNull(boolean aNullFlag) {

    this.nameNull = aNullFlag;
  }

  public final boolean isNameNull() {

    return this.nameNull;
  }

  private String value;

  /** Attribute value Be Seted Falg */
  private boolean valueSetted = false;

  /** Attribute value is Null Falg */
  private boolean valueNull = false;

  /**
   * Get value
   *
   * @return String
   */
  public final String getValue() {

    if (isValueNull()) {
      return null;
    } else {
      return StringUtils.trim(value);
    }
  }

  /**
   * Set value
   *
   * @param String
   */
  public final void setValue(String value) {

    this.value = StringUtils.trim(value);

    this.valueSetted = true;

    this.setValueNull(this.value == null);
  }

  /**
   * Get value Has Been Setted
   *
   * @return boolean
   */
  public final boolean isValueSetted() {
    return this.valueSetted;
  }

  /** Set value Null */
  public final void setValueNull() {

    this.valueNull = true;
  }

  public final void setValueNull(boolean aNullFlag) {

    this.valueNull = aNullFlag;
  }

  public final boolean isValueNull() {

    return this.valueNull;
  }

  public int hashCode() {
    final int prime = 31;
    int result = 1;

    result = prime * result + (int) (getId() ^ (getId() >>> 32));

    return result;
  }

  public boolean equals(Object obj) {

    if (obj == null) {
      return false;
    }
    if ((obj instanceof ProductUIFormLayoutData) == false) {
      return false;
    }
    ProductUIFormLayoutData other = (ProductUIFormLayoutData) obj;

    if (getId() != other.getId()) {
      return false;
    }

    return true;
  }

  public String toString() {

    StringBuffer buffer = new StringBuffer();

    buffer.append("[");

    buffer.append("id=");
    buffer.append(this.id);

    buffer.append("formFieldId=");
    buffer.append(this.formFieldId);

    buffer.append("name=");
    buffer.append(this.name);

    buffer.append("value=");
    buffer.append(this.value);

    buffer.append("]");

    return buffer.toString();
  }
}
